<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <style>
        div {
            width: 800px;
        }

        #title {
            text-align: center;
            font-size: 25px;
            font-weight: 200;
        }

        #add {
            text-align: right;
        }
    </style>
    <script type="text/javascript">
        function deleteemp(psid) {
            var result = window.confirm("您确定要删除吗？");
            if (result == true) {
                window.location.href = "emp?method=delete&psid=" + psid;
            }
        }
    </script>
</head>
<body>

<div id="title">共享车位管理</div>
<div id="add"><a href="" th:href="@{/emp(method=addJump)}">添加车辆</a></div>
<div id="tb">
    <table width="900" border="1" cellspacing="0" cellpadding="0">
        <tr bgcolor="#6ec996">
            <td width="130">车位编号</td>
            <td width="133">车位所属者</td>
            <td width="134">联系方式</td>
            <td width="135">街道</td>
            <td width="140">车位号</td>
            <td width="142">共享开始时间</td>
            <td width="145">共享结束时间</td>
            <td width="146">单价</td>
            <td width="114">操作</td>
        </tr>
            <tr th:each="emp:${emps}">
                <td th:text="${emp.psid}">1</td>
                <td th:text="${emp.owner}">小陈</td>
                <td th:text="${emp.phone}">88888888</td>
                <td th:text="${emp.street}">潍坊市寒亭区</td>
                <td th:text="${emp.parkingnum}">558</td>
                <td th:text="${emp.starttime}">十一点</td>
                <td th:text="${emp.endtime}">十二点</td>
                <td th:text="${emp.price}">55.0</td>
                <td><a th:href="@{/emp(method=getById,psid=${emp.psid})}">修改</a>
                    &nbsp;&nbsp;&nbsp;&nbsp;
                    <a th:href="|javascript:deleteemp(${emp.psid})|">删除</a>
                </td>
            </tr>
    </table>
</div>
<div style="color:#ff0000;" th:if="${str}!=null" th:text="${str}"></div>
</body>
</html>

